@use '@scss/common' as *;

.logoShowcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  position: relative;
  width: 100%;

  .horizontalLine,
  .verticalLine,
  .verticalLineNoDesktop {
    position: absolute;
    z-index: 1;
  }

  .horizontalLine {
    left: 0;
    right: 0;
    height: 1px;
  }

  .verticalLine {
    top: 0;
    bottom: 0;
    width: 1px;
  }

  .verticalLineNoDesktop {
    top: 0;
    bottom: 0;
    width: 1px;
    opacity: 0;
    @include mid-break {
      opacity: 1;
    }
  }

  .topHorizontalLine {
    top: 0;
    left: 25%;
    width: 75%;
  }

  .bottomHorizontalLine {
    bottom: 0;
    right: 25%;
    width: 75%;
  }
}

.logoShowcaseItem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/scanline-dark.png');
    background-repeat: repeat;
    opacity: 0.08;
    z-index: 0;

    [data-theme='dark'] & {
      background-image: url('/images/scanline-light.png');
    }
  }

  &::after {
    content: '';
    display: block;
    padding-top: 100%;
  }

  .contentWrapper {
    position: absolute;
    top: 1.5rem;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;

    @include small-break {
      top: 1rem;
      bottom: 1rem;
      left: 1rem;
      right: 1rem;
    }

    > div {
      display: flex;
      align-items: center;
      justify-content: center;
      transition:
        opacity 1s ease,
        filter 1s ease;
      opacity: 0;
      filter: blur(0px);
    }
  }
}

.logoPresent {
  &::before {
    background-image: none;

    [data-theme='dark'] & {
      background-image: none;
    }
  }
}

.noScanline {
  &::before {
    background-image: none;

    [data-theme='dark'] & {
      background-image: none;
    }
  }
}

.crosshair {
  position: absolute;
  width: 1rem;
  height: auto;
  z-index: 5;
  color: var(--theme-elevation-1000);
  opacity: 0.5;
}

.crosshairBottomLeft {
  left: -0.5rem;
  bottom: -0.5rem;
}

.crosshairTopRight {
  right: -0.5rem;
  top: -0.5rem;
}

.crosshairFirstCell {
  left: calc(25% - 0.45rem);
  bottom: calc(66.666% - 0.55rem);
}

.crosshairSecondRowThirdCell {
  left: calc(75% - 0.45rem);
  bottom: calc(33.333% - 0.55rem);
}

:global([data-theme='dark']) {
  .logoShowcase {
    .horizontalLine,
    .verticalLine,
    .verticalLineNoDesktop {
      background: var(--grid-line-dark);
    }
  }
}

:global([data-theme='light']) {
  .logoShowcase {
    .horizontalLine,
    .verticalLine,
    .verticalLineNoDesktop {
      background: var(--grid-line-dark);
    }
  }
}
